Promise.resolve()
    .then(() => {
        throw new Error('错误1');
    })
    .then(() => {
        console.log('不会执行');
    })
    .catch(error => {
        console.log('捕获错误1:', error.message);
        throw new Error('错误2');
    })
    .catch(error => {
        console.log('捕获错误2:', error.message);
    });